<template>
	<div>{{title}}</div>
	<ul>
		<li v-for="item in newArray">{{item}}</li>
	</ul>
	
	<button @click="returnHandle">返回事件</button>
</template>

<script>
	export default{
		name:"this is components",
		data(){
			return{
				message:"我是子组件的数据"
			}
		},
		props:{
			title:{
				type:String,
				default:""
			},
			newArray:{
				type:Array,
				default:function(){
					return []
				}
			}
		},
		components:{
			
		},
		methods:{
			returnHandle(){
				this.$emit("returnHandle",this.message)
			}
		}
	}
</script>

<style>
	div{
		width: 300px;
		height: 300px;
		background-color: aquamarine;
	}
</style>